<!--********************************************************************
* Copyright© 2000 - 2025 SuperMap Software Co.Ltd. All rights reserved.
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title data-i18n="resources.title_tiledMapLayerProj4"></title>
    <script type="text/javascript" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<!--[if lte IE 8]>
<script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=default-3.3&excludes=Event"></script>
<![endif]-->
<script type="text/javascript" src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
    var host = window.isLocal ? window.server : "https://iserver.supermap.io";
    var map, url = host + "/iserver/services/map-jingjin/rest/maps/京津地区地图";
    //自定义比例尺
    var scaleDenominators = [4000000, 2000000, 1000000, 500000, 250000, 125000];
    var origin = [114.59, 42.31];
    //leaflet CRS投影设置
    var crs = new L.supermap.Proj.CRS("EPSG:4326", {
        origin: origin,
        scaleDenominators: scaleDenominators
    });

    map = L.map('map', {
        crs: crs,
        center: [39.79, 116.85],
        maxZoom: 5,
        zoom: 0,
    });
    new L.supermap.TiledMapLayer(url).addTo(map);
</script>
</body>
</html>